export default {
    data: {
//        通讯录数组
        mailList: [
            {
                id: 1,
                title: "王安石1",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img1.jpg'
            },
            {
                id: 2,
                title: "李乐2",
                subTitle: "吃什么？",
                src: '/common/images/img1.jpg'
            },
            {
                id: 3,
                title: "李君3",
                subTitle: "牛排？",
                src: '/common/images/img1.jpg'
            },
            {
                id: 4,
                title: "牛晶4",
                subTitle: "火锅？",
                src: '/common/images/img2.jpg'
            },
            {
                id: 5,
                title: "安恒5",
                subTitle: "川菜？",
                src: '/common/images/img2.jpg'
            },
            {
                id: 6,
                title: "王浪浪6",
                subTitle: "虾滑？",
                src: '/common/images/img4.jpg'
            },
            {
                id: 7,
                title: "石凡7",
                subTitle: "我全都要",
                src: '/common/images/img3.jpg'
            },
            {
                id: 8,
                title: "蓓蕾8",
                subTitle: "咦~~~",
                src: '/common/images/img3.jpg'
            },
            {
                id: 9,
                title: "导恒9",
                subTitle: "哈哈哈哈",
                src: '/common/images/img3.jpg'
            },
            {
                id: 10,
                title: "程远10",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img4.jpg'
            },
            {
                id: 11,
                title: "张元11",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img4.jpg'
            },
            {
                id: 12,
                title: "袁磊12",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img2.jpg'
            },
            {
                id: 13,
                title: "玛丽13",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img2.jpg'
            },
            {
                id: 14,
                title: "李珍14",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img3.jpg'
            },
            {
                id: 15,
                title: "公盟15",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img2.jpg'
            },
            {
                id: 16,
                title: "谈妮16",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img4.jpg'
            },
            {
                id: 17,
                title: "胖子17",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img3.jpg'
            },
            {
                id: 18,
                title: "8子18",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img3.jpg'
            },
            {
                id: 19,
                title: " 子19",
                subTitle: "今晚一起吃饭？",
                src: '/common/images/img4.jpg'
            }
        ],
        leftBtnList: [
            {
                id: 3,
                type: 'left',
                name: "更多",
                backgroundColor: "#4facfe",
                color: "#ffffff",
                fontSize: '18px'
            }
        ],
        rigthBtnList: [
            {
                id: 1,
                type: 'rigth',
                name: "详情",
                backgroundColor: "#667eea",
                color: "#ffffff",
                fontSize: '18px'
            },
            {
                id:2,
                type: 'rigth',
                name: "删除",
                backgroundColor: "#ff9a9e",
                color: "#ffffff",
                fontSize: '18px'
            }
        ]
    },
    onReady() {
        setTimeout(() => {
            this.$child('mail_list').myInit();
        }, 0)
    },
    clickBtn(info, type, btn) {
        let mailList = [];
        if (btn.id === 2) {
            mailList = this.mailList.filter(item => {
                return item.id !== info.detail.id
            })
            this.mailList = mailList;
            setTimeout(() => {
                this.$child('mail_list').myInit();
            }, 0)
        }
    }
}
